

from rest_framework.viewsets import ModelViewSet
from meiduo_admin.custom_paginations import MyPage
from goods.models import SKUImage
from meiduo_admin.serializers.image_serializers import *
from rest_framework.generics import ListAPIView


class SKUSimpleView(ListAPIView):
    queryset = SKU.objects.all()
    serializer_class = SKUSimpleModelSerialzier


class ImageViewSet(ModelViewSet):
    queryset = SKUImage.objects.all()
    serializer_class = ImageModelSerializer
    pagination_class = MyPage